package com.easygoods.request;

import com.bestvike.stone.spring.exception.AssertUtils;
import com.bestvike.stone.spring.rest.IRequest;
import lombok.Data;

/**
 * @author zhq
 * @date 2019/1/3 15:44
 */
@Data
public class OrderCommitRequestSku implements IRequest {
    private String merchantId;
    private String skuId;
    private Integer num;

    @Override
    public void assertValid() {
        AssertUtils.hasText(this.merchantId, "merchantId");
        AssertUtils.hasText(this.skuId, "skuId");
        AssertUtils.isTrue(this.num >= 1, "商品数量要大于等于1");
    }
}
